﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace FirstWindows
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            MessageBox.Show("欢迎来到窗体世界!");
        }

        private void Form1_MouseClick(object sender, MouseEventArgs e)
        {
            //BackColor = Color.Blue;

            //Form2 form2 = new Form2();
            //form2.Show();
        }

        private void Form1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            //BackColor = Color.Pink;

            var Message= MessageBox.Show("消息的主要信息","信息框",MessageBoxButtons.YesNo,MessageBoxIcon.Information);
            if (Message == DialogResult.Yes)
            {
                MessageBox.Show("你点击了同意，我们就去玩");
            }
            else 
            {
                MessageBox.Show("你点击了不同意，我们就不去玩");
            }
        }
    }
}
